package com.example.testapplication;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import com.example.testapplication.activity.BaseActivity;
import com.example.testapplication.activity.UserLoginActivity;
import com.example.testapplication.activity.UserRegisterActivity;

public class MainActivity extends BaseActivity {

    private Button btnUser;
    private Button btnAdmin;

    @Override
    protected int initLayout() {
        return R.layout.activity_main;
    }

    @Override
    protected void initView() {
        btnUser = findViewById(R.id.btn_user);
        Log.d("MainActivity", "btnUser: " + btnUser);
        btnAdmin = findViewById(R.id.btn_admin);
        Log.d("MainActivity", "btnAdmin: " + btnAdmin);
    }

    @Override
    protected void initData() {
        btnUser.setOnClickListener((v) -> {
//                Intent in = new Intent(MainActivity.this, UserLoginActivity.class);
//                startActivity(in);
                navigateTo(UserLoginActivity.class);
            });
        btnAdmin.setOnClickListener((v)-> {
//                Intent in = new Intent(MainActivity.this, UserRegisterActivity.class);
//                startActivity(in);
            navigateTo(UserRegisterActivity.class);
        });
    }
}